package com.dragon.hash;

import java.util.Objects;

/**
 * @author dragon
 * @version V1.0.0-RELEASE
 * @date 2019/5/27 16:29
 */
public class Student {

    private String name;

    private Integer age;

    private String className;

    public Student(String name, Integer age, String className) {
        this.name = name;
        this.age = age;
        this.className = className;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(name, student.name) &&
                Objects.equals(age, student.age) &&
                Objects.equals(className, student.className);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age, className);
    }
}
